﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPageContent.master" AutoEventWireup="false" CodeFile="ItemUnit.aspx.vb" Inherits="Setup_ItemUnit" %>

<%@ Register Src="~/UserControls/DDL.ascx" TagName="DoubleFilteredDropDownList"
    TagPrefix="uc1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

<style type="text/css">
.radalert
{
    background:none !important;
}
</style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeaderPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">





    
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="WUCItem">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgUnit" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSave">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgUnit" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="MetroTouch">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" ReloadOnShow="true"> 
    </telerik:RadWindowManager>

    <br /><br />

    <table style="width:100%" >
        <tr>
            <td style="width:200px;">
                 &nbsp;&nbsp;  &nbsp;&nbsp;
                 
                 <asp:Label ID="lblItem" runat="server" meta:resourcekey="lblItem"></asp:Label>

                </td>
            <td style="width:200px;">
                
                <uc1:DoubleFilteredDropDownList ID="WUCItem" IsRequired="true" runat="server" DataSourceId="odsItem"
                DataTextField="<%$ Resources:SystemResource, Item %>" DataValueField="ItemID" AutoPostBack="true"
                DefaultChoosedItem="ChooseOne" ValidationGroup="valItemUnit" OnSelectedIndexChanged="WUCItem_SelectedIndexChanged" />
       
                </td>
                <td style="width:200px;">
                </td>
                <td style="width:200px;"></td>
        </tr>
        <tr>
            <td colspan="4">

        <br /><br />
        
            <telerik:RadGrid ID="rgUnit" DataSourceID="odsUnit" AllowMultiRowSelection="true"
            runat="server" AllowSorting="True" GridLines="None" AutoGenerateColumns="False"
            AllowPaging="true" PageSize="10">
            <MasterTableView DataKeyNames="UnitID" DataSourceID="odsUnit">
                <Columns>
                    <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" >
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridClientSelectColumn>
                    
                    <telerik:GridBoundColumn DataField="UnitID" HeaderText="UnitID" ReadOnly="True" SortExpression="UnitID"
                        UniqueName="UnitID" Visible="false">
                    </telerik:GridBoundColumn>
                            
                    <telerik:GridBoundColumn DataField="UnitNameAr" meta:ResourceKey="gbcUnitNameAr"
                        SortExpression="UnitNameAr" UniqueName="UnitNameAr" >
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"/>
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="UnitNameEn" meta:ResourceKey="gbcUnitNameEn"
                        SortExpression="UnitNameEn" UniqueName="UnitNameEn"  >
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </telerik:GridBoundColumn>

                </Columns>
            </MasterTableView>
            <ClientSettings EnableRowHoverStyle="true">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
             <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
        </telerik:RadGrid>

        </td>

        </tr>
        <tr>
            <td colspan ="4" align ="center" >
            <br /><br />
                <telerik:RadButton ID="btnSave" runat="server" Text="Save" CausesValidation="true"  meta:ResourceKey="btnSave" ValidationGroup="valItemUnit" >
                        </telerik:RadButton>
            </td>
        
        </tr>
    </table>

        
        <asp:ObjectDataSource ID="odsItem" runat="server" 
            SelectMethod="QueryDatabase" TypeName="DBItemSP" >
            <SelectParameters>
                <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
                <asp:Parameter DefaultValue="RtvItem" Name="Operation" Type="String" />
                <asp:Parameter Name="ItemID" Type="String" />
                <asp:Parameter Name="ItemNameAr" Type="String" />
                <asp:Parameter Name="ItemNameEn" Type="String" />
                <asp:Parameter Name="ItemDesc" Type="String" />
                <asp:Parameter Name="Highlevel" Type="String" />
                <asp:Parameter Name="LowLevel" Type="String" />
                <asp:Parameter Name="ItemCatNo" Type="String" />
                <asp:Parameter Name="ItemStatus" Type="String" />
                <asp:Parameter Name="IsExpiryDate" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>


        <asp:ObjectDataSource ID="odsUnit" runat="server" 
            SelectMethod="QueryDatabase" TypeName="DBUnitSP" >
            <SelectParameters>
                <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
                <asp:Parameter DefaultValue="RtvUnit" Name="Operation" Type="String" />
                <asp:Parameter Name="UnitID" Type="String" />
                <asp:Parameter Name="UnitNameAr" Type="String" />
                <asp:Parameter Name="UnitNameEn" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>






</asp:Content>

